{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "af042180-4e1c-4bde-96b3-7eaf26d71469",
   "metadata": {},
   "outputs": [],
   "source": [
    "import handcalcs.render\n",
    "from math import sqrt, pi"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "172e3fbb-0173-4596-87ae-2c37779a36bf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\n",
       "\\begin{aligned}\n",
       "a &= 3 \\; \n",
       "\\\\[10pt]\n",
       "b &= -10 \\; \n",
       "\\\\[10pt]\n",
       "c &= 2 \\; \n",
       "\\\\[10pt]\n",
       "x &= \\left( - b \\right) + \\frac{ \\sqrt { \\left( b \\right) ^{ 2 } - 4 \\cdot a \\cdot c } }{ 2 \\cdot a }  = \\left( - -10 \\right) + \\frac{ \\sqrt { \\left( -10 \\right) ^{ 2 } - 4 \\cdot 3 \\cdot 2 } }{ 2 \\cdot 3 } &= 11.453  \n",
       "\\end{aligned}\n",
       "\\]"
      ],
      "text/plain": [
       "<IPython.core.display.Latex object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%render\n",
    "a=3\n",
    "b=-10\n",
    "c=2\n",
    "x = -b + sqrt(b**2 - 4*a*c)/(2*a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "f619fdd9-9e52-41df-9cc0-88e480a6d65d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "\\[\n",
       "\\begin{aligned}\n",
       "a &= 2 \\; \n",
       "\\\\[10pt]\n",
       "b &= 3 \\; \n",
       "\\\\[10pt]\n",
       "c &= 2 \\cdot a + \\frac{ b }{ 3 }  = 2 \\cdot 2 + \\frac{ 3 }{ 3 } &= 5.000  \n",
       "\\end{aligned}\n",
       "\\]"
      ],
      "text/plain": [
       "<IPython.core.display.Latex object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%render\n",
    "a = 2\n",
    "b = 3\n",
    "c = 2*a + b/3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "002ac1c5-36fc-4b83-b3fe-59f9d13f99f0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\\[\n",
      "\\begin{aligned}\n",
      "a &= \\frac{ 2 }{ 3 } \\cdot \\sqrt { \\pi }  = \\frac{ 2 }{ 3 } \\cdot \\sqrt { 3.142 } &= 1.182  \n",
      "\\end{aligned}\n",
      "\\]\n"
     ]
    }
   ],
   "source": [
    "%%tex\n",
    "a = 2 / 3 * sqrt(pi)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "821831dc-1266-4042-bbff-d36945d2c776",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{a^{3}}{3} + \\frac{a^{2} b}{2}$"
      ],
      "text/plain": [
       "a**3/3 + a**2*b/2"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import sympy as sp\n",
    "import handcalcs.render\n",
    "a,b,c=sp.symbols(\"a b c\")\n",
    "d= a**2 +b*a\n",
    "f= sp.integrate(d,a)\n",
    "f"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d9268400-8436-4c33-b022-20f9a24ff7ac",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
